/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package br.ufrn.generativemodel.generativemodel.impl;

import br.ufrn.generativemodel.generativemodel.Aspect;
import br.ufrn.generativemodel.generativemodel.AssetData;
import br.ufrn.generativemodel.generativemodel.Feature;
import br.ufrn.generativemodel.generativemodel.FeatureData;
import br.ufrn.generativemodel.generativemodel.Field;
import br.ufrn.generativemodel.generativemodel.GenerativeModel;
import br.ufrn.generativemodel.generativemodel.GenerativemodelFactory;
import br.ufrn.generativemodel.generativemodel.GenerativemodelPackage;
import br.ufrn.generativemodel.generativemodel.Mapping;
import br.ufrn.generativemodel.generativemodel.MappingData;
import br.ufrn.generativemodel.generativemodel.Method;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;

import org.eclipse.emf.ecore.impl.EFactoryImpl;

import org.eclipse.emf.ecore.plugin.EcorePlugin;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Factory</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class GenerativemodelFactoryImpl extends EFactoryImpl implements GenerativemodelFactory {
	/**
	 * Creates the default factory implementation.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static GenerativemodelFactory init() {
		try {
			GenerativemodelFactory theGenerativemodelFactory = (GenerativemodelFactory)EPackage.Registry.INSTANCE.getEFactory("http://generativemodel/1.0"); 
			if (theGenerativemodelFactory != null) {
				return theGenerativemodelFactory;
			}
		}
		catch (Exception exception) {
			EcorePlugin.INSTANCE.log(exception);
		}
		return new GenerativemodelFactoryImpl();
	}

	/**
	 * Creates an instance of the factory.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public GenerativemodelFactoryImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public EObject create(EClass eClass) {
		switch (eClass.getClassifierID()) {
			case GenerativemodelPackage.CLASS: return createClass();
			case GenerativemodelPackage.FIELD: return createField();
			case GenerativemodelPackage.METHOD: return createMethod();
			case GenerativemodelPackage.FEATURE: return createFeature();
			case GenerativemodelPackage.MAPPING: return createMapping();
			case GenerativemodelPackage.GENERATIVE_MODEL: return createGenerativeModel();
			case GenerativemodelPackage.FEATURE_DATA: return createFeatureData();
			case GenerativemodelPackage.MAPPING_DATA: return createMappingData();
			case GenerativemodelPackage.ASSET_DATA: return createAssetData();
			case GenerativemodelPackage.ASPECT: return createAspect();
			default:
				throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
		}
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public br.ufrn.generativemodel.generativemodel.Class createClass() {
		ClassImpl class_ = new ClassImpl();
		return class_;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Field createField() {
		FieldImpl field = new FieldImpl();
		return field;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Method createMethod() {
		MethodImpl method = new MethodImpl();
		return method;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Feature createFeature() {
		FeatureImpl feature = new FeatureImpl();
		return feature;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Mapping createMapping() {
		MappingImpl mapping = new MappingImpl();
		return mapping;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public GenerativeModel createGenerativeModel() {
		GenerativeModelImpl generativeModel = new GenerativeModelImpl();
		return generativeModel;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public FeatureData createFeatureData() {
		FeatureDataImpl featureData = new FeatureDataImpl();
		return featureData;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public MappingData createMappingData() {
		MappingDataImpl mappingData = new MappingDataImpl();
		return mappingData;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public AssetData createAssetData() {
		AssetDataImpl assetData = new AssetDataImpl();
		return assetData;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Aspect createAspect() {
		AspectImpl aspect = new AspectImpl();
		return aspect;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public GenerativemodelPackage getGenerativemodelPackage() {
		return (GenerativemodelPackage)getEPackage();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @deprecated
	 * @generated
	 */
	@Deprecated
	public static GenerativemodelPackage getPackage() {
		return GenerativemodelPackage.eINSTANCE;
	}

} //GenerativemodelFactoryImpl
